<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>律师预约</title>
	<meta name="decorator" content="default"/>
	<link type="text/css" rel="stylesheet" href="${ctxStatic}/css/tdc/tdcBespeak.css" />
	<script type="text/javascript" src="${ctxStatic}/jquery/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="${ctxStatic}/jquery/ajaxfileupload-1.1.js"></script>
	<script type="text/javascript" src="${ctxStatic}/layer/layer.js"></script>
	<script type="text/javascript" src="${ctxStatic}/js/tdc/up-down-load.js"></script>
	<script type="text/javascript" src="${ctxStatic}/js/tdc/tdcBespeak.js"></script>
	<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
	<!-- 保存状态 -->	
	<input id="saveStatus" type="hidden" value="${saveStatus}"/>
	<!--回显二维码图片、预约编号-->
	<input id="bespeakNumberSave" type="hidden" value="${tdcVisitorReservation.bespeakNumber}"/>
	<input id="bespeak2codeSave" type="hidden" value="${tdcVisitorReservation.bespeak2code}"/>
	
	<input id="inputCtxStatic" type="hidden" value="${ctxStatic}"/>
	<input id="inputCtx" type="hidden" value="${pageContext.request.contextPath}"/>
	<div class="div_01">
	<form:form id="lawBespeakForm" modelAttribute="tdcVisitorReservation" action="${pageContext.request.contextPath}/visitor/save" 
		 class="form01" method="post">
		 	<!--预约id,用于附件的名字-->
		<input id="id" type="hidden" value="${tdcVisitorReservation.id}"/>
		<input id="bespeakJob" name="bespeakJob" type="hidden" value="律师"/>
			<div class="div_0101">
				<label class="label01" for="bespeakType">会见类型</label>
				<form:select path="bespeakType" name="bespeakType">
					<form:option value="提审提讯">提审提讯</form:option>
					<form:option value="会见">会见</form:option>
				</form:select>
			</div>
			<div class="div_0102">
				<label class="label01" for="bespeakName">律师姓名</label>
				<form:input path="bespeakName" name="bespeakName" htmlEscape="false" maxlength="20" class="input01"/>
			</div>
			<div class="div_0103">
				<label class="label01" for="bespeakCredentials">律师证件</label>
				<div class="daoru">
			        <!--图片名-->
			        <input type="hidden"  class="input_text" id="bespeakCredentials" name="bespeakCredentials"  readonly="true"/>   
			        <!--回显图片-->
			        <c:choose>
			        	<c:when test="${empty tdcVisitorReservation.bespeakCredentials}">
			        		<img alt="" src="" id="bespeakCredentials3"/>
			        	</c:when>
			        	<c:otherwise>
		                   <img alt="" src="${tdcVisitorReservation.bespeakCredentials}" id="bespeakCredentials3"/>
			        	</c:otherwise>
			        </c:choose>
			        <input type="button" class="btn01" value="浏览..." onclick="document.getElementById('bespeakCredentials2').click()"/>  
					<input id="bespeakCredentials2" accept="image/*" name="file" type="file" class="input_file"
                  		 onchange="uploadImag(this,0,'bespeakCredentials','bespeakCredentials3')"/>
			    </div> 
			</div>
			<div class="div_0102">
				<label class="label01" for="suspectName">嫌犯姓名</label>
				<form:input path="suspectName" name="suspectName" htmlEscape="false" maxlength="20" class="input01"/>
			</div>
			<div class="div_0103">
				<label class="label01" for="suspectAttachment">附件证明</label>
				<div class="daoru">
					<!--图片名-->
			        <input type="hidden" class="input_text" id="suspectAttachment" name="suspectAttachment" readonly="true"/>
			        <!--回显图片-->
			        <c:choose>
			        	<c:when test="${empty tdcVisitorReservation.suspectAttachment}">
			        		<img alt="" src="" id="suspectAttachment3"/>
			        	</c:when>
			        	<c:otherwise>
		                   <img alt="" src="${tdcVisitorReservation.suspectAttachment}" id="suspectAttachment3"/>
			        	</c:otherwise>
			        </c:choose>
			        <input type="button" class="btn01"  value="浏览..."  onclick="document.getElementById('suspectAttachment2').click()"/>  
					<input id="suspectAttachment2" accept="image/*" name="file" type="file" class="input_file"
                 		 onchange="uploadImag(this,0,'suspectAttachment','suspectAttachment3')"/>
			    </div> 
			</div>
			<div class="div_0101">
				<label class="label01" for="suspectCredentialsNumber">嫌犯身份证号</label>
				<form:input path="suspectCredentialsNumber" name="suspectCredentialsNumber" htmlEscape="false" maxlength="18" class="input01"/>
			</div>
			<div class="div_0105">
				<label class="label01" for="bespeakStart">预约时间</label>
				<input id="bespeakStart" name="bespeakStart" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${tdcVisitorReservation.bespeakStart}" pattern="yyyy-MM-dd HH:mm"/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false,minDate:'%y-%M-%d %H:%m:00',maxDate:'%y-%M-{%d+6} 21:00:00'});"/> 
					<!-- onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/> -->
			</div>
			<div class="div_0106">
				<label class="label01" for="bespeakEnd">至</label>
				<input id="bespeakEnd" name="bespeakEnd" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
					value="<fmt:formatDate value="${tdcVisitorReservation.bespeakEnd}" pattern="yyyy-MM-dd HH:mm"/>" 
					onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false,maxDate:'21:00:00'});"/>
<!-- 					onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/> -->
			</div>
			<div class="div_0104">
				<input type="button" id="sub01" value="提交" class="btn02"/>
			</div>
		</form:form>
		
		<!--预约成功-->
		<div class="bspeakSuccess01">
			<div class="bspeakSuccess0101">
				<div class="bs02">预约成功</div>
				<div class="bs2code">
		        	<img alt="" src="" id="bespeak2code"/>
				</div>
				<div class="bsnumber">预约编号:20170320001</div>
				<div class="div_0107">
					<input type="button" id="btn03" value="关闭" class="btn02"/>
				</div>
			</div>
		</div>
	</div>
</body>
</html>
